import request from "@/utils/request";

export function listSysMenu() {
    return request({
        url: '/system/menu/list',
        method: 'get'
    })
}

export function addSysMenu(data) {
    return request({
        url: '/system/menu/insert',
        method: 'post',
        data: data
    })
}

export function deleteSysMenu(id) {
    return request({
        url: '/system/menu/delete/' + id,
        method: 'delete'
    })
}

export function getSysMenu(id) {
    return request({
        url: '/system/menu/' + id,
        method: 'get'
    })
    }

    export function updateSysMenu(data) {
        return request({
            url: '/system/menu/update',
            method: 'put',
            data: data
        })
    }

export function listAllActionByMenuId(id) {
    return request({
        url: '/system/menu/listAllActionByMenuId/' + id,
        method: 'get'
    })
}

export function listSysMenuAll() {
    return request({
        url: '/system/menu/listAll',
        method: 'get'
    })
}
